/**
 * 
 */
package versuch.server;

import versuch.client.Feedback;
import versuch.client.PollService;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * @author Chris
 *
 */
public class PollServiceImpl extends RemoteServiceServlet implements
		PollService {


	/**
	 * 
	 */
	//private static final long serialVersionUID = 1L;

	@Override
	public Boolean submitFeedback(Feedback feedback) {
		
		System.out.println("BEING AT SERVER SIDE");
		
		int lID = feedback.getLecture().getLectureID();
		
		//if(!CookieManager.cookieExists(lID))
		//{
			Database.addFeedbackToLecture(lID, feedback);
			
			System.out.println("After DB call");
			//CookieManager.setCookie(lID);
			return true;
			
		//}
		
		//return false;
	}

}
